﻿@model Vasilek.Web.Models.ProductDtoBase

<form method="post">
    <input asp-for="ProductId" hidden />
    <div class=" pt-4">
        <div class="card container" style="border:1px solid #808080;">
            <div class="card-header bg-dark text-light row" style="border-radius: 0px;">
                <div class="col-12 col-md-6">
                    <h1 class="text-white">@Model.Name</h1>
                </div>
                <div class="col-12 col-md-6 text-end">
                    <h1 class="text-white"> @string.Format("{0:c}", Model.Price)</h1>
                </div>
            </div>
            <div class="card-body">
                <div class="container rounded p-2">
                    <div class="row">
                        <div class="col-12 col-lg-4 p-1 text-center">
                            <img src="@Model.ImageUrl" style="border-radius:35px;" width="100%" class="rounded" />
                        </div>
                        <div class="col-12 col-lg-8">
                            <div class="row pl-3">

                                <div class="col-12">
                                    <span class="badge badge-primary text-primary p-3 border fs-4">@Model.Category.CategoryName</span>
                                    <h3 class="text-primary"></h3>

                                    <p class="text-secondary">@Html.Raw(Model.Description) </p>

                                </div>
                            </div>
                            <div class="row px-4">
                                <input asp-for="Count" class="form-control p-3" />
                                <span asp-validation-for="Count" class="text-danger fs-4"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <div class="card-footer row bg-dark">

                <div class="avd_div col-12 col-md-6 pb-1">

                    <a asp-action="CategoryVM" asp-route-category="@Model.Category.CategoryName" class="bucn_3_4r" style="height:50px"> Обратно к списку </a>
                
                </div>
                <div class="avd_div col-12 col-md-6 ">
                    <button type="submit" class="bucn_3_4r" style="height:50px">Добавить в корзину</button>
                </div>

            </div>
        </div>
    </div>
</form>

@section Scripts{ 
    <partial name="_ValidationScriptsPartial" />
}